using LeaRun.Application.Entity.SystemManage;
using LeaRun.Application.IService.SystemManage;
using LeaRun.Application.Service.SystemManage;
using LeaRun.Util.WebControl;
using System;
using System.Collections.Generic;
using System.Data;

namespace LeaRun.Application.Busines.SystemManage
{
	public class DataSourceBLL
	{
		private DataSourceIService service = new DataSourceService();
		public IEnumerable<DataSourceEntity> GetPageList(Pagination pagination, string queryJson)
		{
			return this.service.GetPageList(pagination, queryJson);
		}
		public IEnumerable<DataSourceEntity> GetList(string queryJson)
		{
			return this.service.GetList(queryJson);
		}
		public DataSourceEntity GetEntity(string keyValue)
		{
			return this.service.GetEntity(keyValue);
		}
		public DataTable GetTableDataList(string dataBaseLinkId, string tableName)
		{
			return this.service.GetTableDataList(dataBaseLinkId, tableName);
		}
		public void RemoveForm(string keyValue)
		{
			try
			{
				this.service.RemoveForm(keyValue);
			}
			catch (Exception)
			{
				throw;
			}
		}
		public string TestData(string dbtype, string connection, string sql)
		{
			return this.service.TestData(dbtype, connection, sql);
		}
		public void SaveForm(string keyValue, DataSourceEntity entity)
		{
			try
			{
				this.service.SaveForm(keyValue, entity);
			}
			catch (Exception)
			{
				throw;
			}
		}
	}
}
